package com.enjoy.ioc.text;

import com.enjoy.ioc.config.AppConfig;
import com.enjoy.ioc.dao.Dao;
import com.enjoy.ioc.dao.IndexDao;
import com.enjoy.ioc.dao.MyBeanFactoryPostProcessor;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.lang.reflect.Proxy;

public class MainTest {

	public static void main(String[] args){
		AnnotationConfigApplicationContext app =
				new AnnotationConfigApplicationContext();
		app.register(AppConfig.class);
//		app.addBeanFactoryPostProcessor(new MyBeanFactoryPostProcessor());
		app.refresh();
//		((Dao) app.getBean(Proxy.class)).query();
		System.out.println(app.getBean("&dao").getClass().getName() );
	}
}
